package com.neusoft.ysu.populationmanagement.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.neusoft.ysu.populationmanagement.vo.VImpPop;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 作者：赵子鉴
 * @since 2024-06-18
 */
@TableName("imp_pop")
@Data
public class ImpPop implements Serializable {
    public ImpPop(){}
    public ImpPop(VImpPop vImpPop) {
        this.popId = vImpPop.getId();
        this.persontypeId = vImpPop.getPersontypeId();
        this.undercontrolId = vImpPop.getUndercontrolId();
        this.personnum = vImpPop.getPersonnum();
        this.isDelete = vImpPop.getIsDelete();
    }

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long popId;

    private Long persontypeId;

    private Long undercontrolId;

    private String personnum;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    private Integer isDelete;

}
